<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/cms/template/edittpl" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>
<body>
  <div class="page">
    <div class="page-hd">
      <h1>修改模版</h1>
    </div>
    <div class="form">
      <form action="{:URL('cms/Template/doaddtpl')}" method="POST" onsubmit="return checkInput()">
        <input type="hidden" name="id" value="{$id}" />
        <input type="hidden" name="sid" value="{$sid}" />
        <dl class="kv">
          <dt>
            <label>模版类型：</label>
          </dt>
          <dd>
            <select name="module" onchange="showTemp(this.options[this.selectedIndex].value)">
              <option value="channels" <eq name="template_type" value="channels">selected</eq>>栏目模版</option>
              <option value="contents" <eq name="template_type" value="contents">selected</eq>>内容模版</option>
              <option value="home" <eq name="template_type" value="home">selected</eq>>首页模版</option>
              <option value="public" <eq name="template_type" value="public">selected</eq>>公用模版</option>
              <option value="search" <eq name="template_type" value="search">selected</eq>>搜索模版</option>
            </select>
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>模版名称：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="fieldname" value="{$template_name}" onkeydown="check()" />
          </dd>
        </dl>
        <dl class="kv" style="display: none;" id="cn">
          <dt>
            <label>生成模版名称：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="create_name" value="{$create_name}" onkeydown="check()" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>模版内容：</label>
          </dt>
          <dd>
            <textarea rows="30" cols="135" name="templateContent">{$templateContent}</textarea>
          </dd>
        </dl>
        <div class="actions">
          <input class="btn btn-y" type="submit" value="修改" />
          <a href="{:URL('cms/Template/sitetemplatelist',array('sid'=>$sid))}" class="btn btn-n">取消</a>
        </div>
      </form>
    </div>
  </div>
</body>
</html>
